/*
 * @Author: chen haoxuan
 * @Date: 2021-05-10 22:42:50
 * @LastEditTime: 2021-05-10 22:48:32
 */
#include <iostream>
using namespace std;
class Student
{
public:
    Student(int n, float s) : num(n), score(s) {}
    void change(int n, float s)
    {
        num = n;
        score = s;
    }
    void display() { cout << num << " " << score << endl; }
    void fun(Student &b)
    {
        b.change(101, 80.5);
        b.display();
    }

private:
    int num;
    float score;
};
int main()
{
    Student stud(101, 78.5);
    stud.display();
    stud.fun(stud);
    system("pause");
}
